package com.jeecg.p3.system.poster.dao;

import com.jeecg.p3.system.poster.entity.PosterManager;
import org.apache.ibatis.annotations.Param;
import org.jeecgframework.p3.core.utils.common.PageQuery;
import org.jeecgframework.p3.core.utils.common.PageQueryWrapper;
import org.jeecgframework.p3.core.utils.persistence.GenericDao;

import java.util.List;
import java.util.Map;

public interface PosterManagerDao extends GenericDao<PosterManager> {
    public Integer count(PageQuery<PosterManager> pageQuery);

    public List<PosterManager> queryPageList(PageQueryWrapper<PosterManager> wrapper);

    /**
     * 根据传入实体类的参数获取海报管理列表
     * @param posterManager
     * @return
     */
    public List<PosterManager> findByParam(PosterManager posterManager);

    /**
     * 查询扫码统计结果
     * @param noOpenIds 不统计的openid
     * @return
     */
    public List<Map<String,Object>> findCount(@Param("noOpenIds")String noOpenIds);

    /**
     * 查询前一天的扫码数量
     * @return
     */
    public Integer findBeforeDayScanNum();

    /**
     * 获取当天扫码数量
     * @return
     */
    public Integer findNowDayScanNum();

    /**
     * 分页查询
     * @param wrapper
     * @return
     */
    public List<PosterManager> findMyCount(PageQueryWrapper<PosterManager> wrapper);

    public Integer myCount(PageQuery<PosterManager> pageQuery);

    /**
     * 分组统计扫码信息
     * @param wrapper
     * @return
     */
    public List<Map<String, Object>> findGroupByParam(PageQuery<PosterManager> wrapper);
}
